﻿#include "stdafx.h"

using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
using namespace	Microsoft::VisualStudio::TestTools::UnitTesting;

namespace TestProject1
{
	[TestClass]
	public ref class BitBufferTest
	{
	public: 
		[TestMethod]
		void bufferAppendingTest()
		{
			BitBuffer buffer(4);
			for (int i = 0; i < 16; ++i)
			{
				buffer.appendBit(1);
			}
			Assert::AreEqual<unsigned char>(0xFF, buffer.getBuffer()[0], "Wrong value for byte 0");
			Assert::AreEqual<unsigned char>(0xFF, buffer.getBuffer()[1], "Wrong value for byte 1");
		}
	};
}
